package com.zhdl.modules.assemblybolt.service;

import com.zhdl.modules.tools.CommonCallback;

public interface AssemblyBoltService {
    void kukaSendCmd(int instruct, CommonCallback<String> callback);

    void PlcRead0To400(CommonCallback<String> callback);

    /**
     * PLC-设置电机速度
     *
     * @param model     轴编号
     * @param speedType 速度类型
     * @param speed     速度
     * @param callback  回调
     */
    void plcSetMotorSpeed(int model, int speedType, float speed, CommonCallback<String> callback);

    /**
     * PLC-设置电机距离
     *
     * @param model        轴编号
     * @param distanceType 距离类型
     * @param distance     速度
     * @param callback     回调
     */
    void plcSetMotorDistance(int model, int distanceType, float distance, CommonCallback<String> callback);

    /**
     * PLC-设置电机运动
     *
     * @param model     轴编号
     * @param readyType 使能类型
     * @param value     写入值
     * @param callback  回调
     */
    void plcSetMotorReady(int model, int readyType, int value, CommonCallback<String> callback);

    void plcSetMotorHomeTrig(int model, CommonCallback<String> callback);

    /**
     * PLC-设置电机运动
     *
     * @param model     轴编号
     * @param readyType 使能类型
     * @param value     写入值
     * @param status    正传/反转
     * @param callback  回调
     */
    void plcSetMotorReady(int model, int readyType, int value, boolean status, CommonCallback<String> callback);

    /**
     * 点动-JOB运动
     *
     * @param model  电机型号
     * @param speed  速度
     * @param status 正反转
     * @param open   运动/停止
     */
    void plcControlMotorJobRun(int model, float speed, boolean status, boolean open);

    void readPlcMotorRunDone(int model, CommonCallback<Boolean> callback);

    void readMotorIOStatus(int bit, CommonCallback<Boolean> callback);

    void readMotorAIDistance(int part, CommonCallback<String> callback);

    void writeMotorIOStatus(int bit, int value, CommonCallback<Boolean> callback);

    void controlInspireMotorRun(String port, int instruct, CommonCallback<String> callback);

    void controlMicroMotorRun(String port, int model, int instruct, CommonCallback<String> callback);

    void plcControlMotorAbsRun(int model, boolean open);

    void plcControlMotorRunX(int model, float speed, float distance);

    void plcControlMotorRunY(int model, float speed, float distance);

    void plcControlMotorSerRun(int model, boolean open);
}
